package com.ml.mall.mapper.partner;

import com.ml.mall.bean.res.partner.PartnerDashboardQueryRes;
import com.ml.mall.bean.res.partner.vo.PartnerDayDetailVo;
import com.ml.mall.bean.res.partner.vo.PartnerSupVarActiveNumVo;
import com.ml.mall.bean.res.partner.vo.PartnerSupVarNumVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ml.mall.entity.company.SysCompany;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author pl
* Created 2021-06-09
*/
@Mapper
@Repository
public interface SysOrderPartnerMapper extends BaseMapper<SysCompany> {

    /**
     * @description    :合作商查询仪表盘中销售额以及买家订单总量
     * @author         :pl
     * @date           :2021/6/9
     **/
    PartnerDashboardQueryRes selectSalesAndPo(@Param("partnerId") Long partnerId, @Param("timeBegin") String timeBegin, @Param("timeEnd") String timeEnd);

    /**
     * @description    :合作商查询仪表盘总的合作卖家以及变体的数量
     * @author         :pl
     * @date           :2021/6/9
     **/
    PartnerSupVarNumVo selectSupAndVarNum(@Param("partnerId") Long partnerId);

    /**
     * @description    :合作商查询仪表盘时间范围内总的合作卖家以及变体的数量
     * @author         :plmall_ml.sys_catalogue_product
     * @date           :2021/6/9
     **/
    PartnerSupVarActiveNumVo selectSupAndVarActiveNum(@Param("partnerId") Long partnerId, @Param("timeBegin") String timeBegin, @Param("timeEnd") String timeEnd);

    /**
     * @description    :合作商查询仪表盘时间范围内买家完成订单量
     * @author         :pl
     * @date           :2021/6/9
     **/
    Integer selectCompletedPO(@Param("partnerId") Long partnerId,@Param("timeBegin") String timeBegin,@Param("timeEnd") String timeEnd);

    /**
     * @description    :合作商查询仪表盘时间范围内处理中的订单量
     * @author         :pl
     * @date           :2021/6/9
     **/
    Integer selectProcessingPO(@Param("partnerId") Long partnerId,@Param("timeBegin") String timeBegin,@Param("timeEnd") String timeEnd);

    /**
     * @description    :合作商查询仪表盘中某一天信息
     * @author         :pl
     * @date           :2021/6/9
     **/
    PartnerDayDetailVo selectOneDateDetail(@Param("partnerId") Long partnerId, @Param("queryCurTime") String queryCurTime);

    /**
     * @description: 合作伙伴 查询限定日期内每天的详细数据
     * @author kyyang
     * @date 2021/8/4 23:59
     * @version 1.0
     */
    List<PartnerDayDetailVo> selectPartnerDateDetailByTimeLine(@Param("partnerId") Long partnerId,@Param("timeBegin") String timeBegin,@Param("timeEnd") String timeEnd);
}
